    <!--载入公共头部-->
    {{include file="VIEW_PATH/Common/header.php"}}
	<link rel="stylesheet" type="text/css" href="Public/Home/Css/content.css"/>
	<script src="Public/Home/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
//			点击小图片
			$('#content .main .pic .thumb span').click(function(){
//				获取当前小图片的序号
				c=$(this).index();
//				让对应的大图片显示
				$('#content .main .pic .itempic img').eq(c).css({'display':'block'}).siblings('img').css({'display':'none'});
			})		
//			点击up标签
            $('.up').click(function(){
//          	获取input的value值
            	val = $(".stock .num")[0].value; 
//          	让value值加1
            	val++;
            	$(".stock .num")[0].value = val;
            })
            $('.down').click(function(){
            	val = $(".stock .num")[0].value; 
//          	让value值减1
            	val = val-1;
            	if(val==0){
            		$(".stock .num")[0].value = 1;
            	}else{
            		$(".stock .num")[0].value = val;
            	}         
            })
            $('.item-sale .skin dl dd li').click(function(){
            	$(this).addClass('bor').siblings('li').removeClass('bor');
            })
             
		})
	</script>
	<script type="text/javascript">
		$(function(){	
			$('#content .main .pic .itempic img').first().css({'display':'block'});
			$('.skin dl dd li').click(function(){
//				alert($(".bor").length)
				if($(".bor").length>={{$count}}){
					var gid = "";
					$.each($(".bor"), function(k,v) {
						gid +=$(this).find("a").attr('type') + ",";
					});	
					$.ajax({
					   type:"post",
					   url:"{{U('getAjax')}}",
					   data:{gid:gid},
					   dataType:'json',
					   success:function(total){
					   	$('.tot').html(total);				   	
					   }
				    });				
				}					
			});
			//购物车异步
			$('.same_btn .add').click(function(){
				if($('.bor').length>={{$count}}){
					var spec="";					
					var num = $(".stock .num")[0].value;
					$.each($('.bor'), function(k,v) {
						spec +=$(this).find('a').html() + ",";
					});
					$.ajax({
						type:"post",
						url:"index.php?m=Home&c=Content&a=index&gid={{$goodsData['goods_id']}}",
						data:{spec:spec,num:num},
						dataType:'json',
						success:function(phpdata){
							if(phpdata==1)
							{
								location.href='{{U('Cart/index')}}';
							}							
						}
					});
				}else{
					alert('请选择规格！');
				}
			})
			//立即购买异步
			$('.same_btn .buy').click(function(){
				if($('.bor').length>={{$count}}){
					var spec="";					
					var num = $(".stock .num")[0].value;
					$.each($('.bor'), function(k,v) {
						spec +=$(this).find('a').html() + ",";
					});
					$.ajax({
						type:"post",
						url:"index.php?m=Home&c=Content&a=buyAjax&gid={{$goodsData['goods_id']}}",
						data:{spec:spec,num:num},
						dataType:'json',
						success:function(phpdata){
							if(phpdata==1)
							{
								location.href='{{U('Order/index')}}';
							}							
						}
					});
				}else{
					alert('请选择规格！');
				}
			})
			//没有登录的立即购买
			$('.same_btn .bb').click(function(){
				if($('.bor').length>={{$count}}){
					alert('请先登录');
				    location.href='{{U('User/login')}}';
				}else{
					alert('请选择规格！');
				}				
			})
		})
	</script>
		<div id="content">
			<div class="main">
				<div class="pic">
					<div class="itempic">
						{{foreach from="$goodsData['big']" key="$k" value="$v"}}
						<img  src="{{$v}}"/>
						{{endforeach}}
					</div>
					<div class="thumb">
						{{foreach from="$goodsData['big']" key="$k" value="$v"}}
						<span>
							<img src="{{$v}}"/>
						</span>
						{{endforeach}}
					</div>
				</div>
				<!--左侧图片结束-->
				<div class="item-sale">
					<h3 class="item-title">{{$goodsData['goods_name']}}</h3>
					<h4 class="item_sub_title">【Modcara】设计师款，自主品牌供应链，实拍！</h4>
					<div class="price">
						<span class="price_now">
							￥<i>{{$goodsData['shopprice']}}</i>						
						</span>
						<span class="price_new">
							￥<i>{{$goodsData['marketprice']}}</i>						
						</span>
						<span class="label">免运费</span>
					</div>
					<ul class="items_infos">
					    <li>
						    <i>限</i>
						        距离恢复原价仅剩
						    <span>2天4小时55分58秒</span>
					    </li>
				    </ul>
				    <div class="item-esm">
				    	<lable>运费</lable>
				    	广东广州
				    	<span>至</span>
				    	<a href="">
				    		北京
				    		<i></i>
				    	</a>
				    	<lable>免运费</lable>
				    </div>
				    <ul class="item-data">
				    	<li>
				    		销量
				    		<span>{{$goodsData['']}}</span>
				    	</li>
				    	<li class="good">
				    		好评率
				    		<span>--(1人)</span>
				    	</li>
				    	<li>
				    		喜欢
				    		<span>839人</span>
				    	</li>
				    </ul>
				    <div class="skin">
				    	{{foreach from="$goodsattrData" key="$k" value="$v"}}
				    	<dl class="pron">
				    		<dt>
				    			{{$v['typeattr_name']}}
				    		</dt>
				    		<dd>
				    			<ul>
				    				{{foreach from="$v['value']" key="$kk" value="$vv"}}
				    				<li>
				    					<a class="color"  href="javascript:" type="{{$vv['goodsattr_id']}}">{{$vv['goods_value']}}</a>
				    				</li>
				    				{{endforeach}}
				    			</ul>
				    		</dd>
				    	</dl>
				    	{{endforeach}}
				    	<dl class="pron">
				    		<dt>
				    			数量
				    		</dt>
				    		<dd>
				    			<div class="stock">
				    			    <input class="num" type="text" name="" id="" value="1" />
				    			    <span class="utn">
				    			    	<span class="up"><i></i></span>
				    			        <span class="down"><i></i></span>	
				    			    </span>
				    			    <span class="total">(库存<span class="tot">0</span>件)</span>
				    			</div>
				    		</dd>
				    	</dl>
				    	<dl style="margin-top: 10px;" class="pron">
				    		<dt>
				    			客服
				    		</dt>
				    		<dd>
				    				<a class="custom" href="">
				    					<em></em>
				    					联系客服
				    				</a>
				    		</dd>
				    	</dl>
				    	<input type="hidden" name="gid" id="gid" value="{{$goodsData['goods_id']}}" />
				    	<div class="same_btn">
				    		<a class="add" href="javascript:;"><em></em>加入购物车</a>
				    		{{if value="isset($_SESSION['id'])"}}				    		
				    		<a class="buy" href="javascript:;"><em></em>立即购买</a>
				    		{{else}}
				    		<a class="bb" href="javascript:;"><em></em>立即购买</a>
				    		{{endif}}
				    	</div>	    	
				    	<div class="spred">
				    		<div class="like">
				    			<a href="">
				    				<i></i>
				    				喜欢
				    				<span style="color: #FF6699;">(859)</span>
				    			</a>
				    		</div>
				    	</div>
				    	<div class="report">
				    		<a href="">举报</a>
				    	</div>
				    </div>
				</div>				
			</div>
		</div>
		<!--中间区域结束-->
		<!--人气单品区域开始-->
		<div id="popular">
			<h3><a href="">人气单品</a></h3>
		</div>
		<div class="may_like">
			<div class="main">
				<div class="pic">
					<img src="Public/Home/images/renqi1.jpg"/>
				</div>
				<a>波点印花灯笼袖修身雪纺衫</a>
				<div class="info-box">
					<span class="price">￥ 179.00</span>
					<span class="buy">12人购买</span>
				</div>
			</div>
			<div class="main">
				<div class="pic">
					<img src="Public/Home/images/renqi1.jpg"/>
				</div>
				<a>波点印花灯笼袖修身雪纺衫</a>
				<div class="info-box">
					<span class="price">￥ 179.00</span>
					<span class="buy">12人购买</span>
				</div>
			</div>
			<div class="main">
				<div class="pic">
					<img src="Public/Home/images/renqi1.jpg"/>
				</div>
				<a>波点印花灯笼袖修身雪纺衫</a>
				<div class="info-box">
					<span class="price">￥ 179.00</span>
					<span class="buy">12人购买</span>
				</div>
			</div>
			<div class="main">
				<div class="pic">
					<img src="Public/Home/images/renqi1.jpg"/>
				</div>
				<a>波点印花灯笼袖修身雪纺衫</a>
				<div class="info-box">
					<span class="price">￥ 179.00</span>
					<span class="buy">12人购买</span>
				</div>
			</div>
			<div class="main">
				<div class="pic">
					<img src="Public/Home/images/renqi1.jpg"/>
				</div>
				<a>波点印花灯笼袖修身雪纺衫</a>
				<div class="info-box">
					<span class="price">￥ 179.00</span>
					<span class="buy">12人购买</span>
				</div>
			</div>
			<div class="main">
				<div class="pic">
					<img src="Public/Home/images/renqi1.jpg"/>
				</div>
				<a>波点印花灯笼袖修身雪纺衫</a>
				<div class="info-box">
					<span class="price">￥ 179.00</span>
					<span class="buy">12人购买</span>
				</div>
			</div>
		</div>
		<!--人气单品区域结束-->
<div id="box-item">
	<div class="cat">
		<h3 class="hd">商品分类</h3>
		<div class="cat_wrap">
			<h4>查看所有商品</h4>
			<ul>
				<li><a href="">最新上架</a></li>
				<li><a href="">热卖单品</a></li>
			</ul><br />
			<h4>全部商品</h4>
			<ul class="cat_list">
				<li><a href="">T恤</a></li>
				<li><a href="">连衣裙</a></li>
				<li><a href="">衬衣</a></li>
				<li><a href="">半裙/裤装</a></li>
				<li><a href="">套装</a></li>
				<li><a href="">雪纺衫</a></li>
				<li><a href="">优品清仓</a></li>
				<li><a href="">其他分类</a></li>
				<li><a href="">卫衣</a></li>
				<li><a href="">牛仔外套</a></li>
				<li><a href="">棒球夹克</a></li>
				<li><a href="">皮衣夹克</a></li>
				<li><a href="">内衣</a></li>
				<li><a href="">搭配包</a></li>
				<li><a href="">马甲</a></li>
				<li><a href="">外套</a></li>
			</ul>
		</div>
	</div>		
			<!--左侧区域结束-->
			<div class="content">
				<div class="top">
					<a href="">商品详情</a>
					<a href="">购买评价 (1)</a>
				</div>
				<h2 class="comm_tle">
					<span>商品介绍</span>
				</h2>
				<div class="more_pic">
					{{$goodsData['intro']}}
				</div>
				<div class="more_pic">
					{{$goodsData['service']}}
				</div>
			</div>
        </div>
       <!--引用底部文件-->
       {{include file="VIEW_PATH/Common/footer.php"}}
	</body>

</html>
